import { z } from 'zod'

import { dayjsStrValidator, nullableString } from '@/utils/customValidators'

export const baseScheme = z.object({
	id: z.number().positive(),
	created_on: dayjsStrValidator,
	updated_on: dayjsStrValidator
})

export const baseSchemeWithNote = baseScheme.extend({
	note: nullableString
})

export const baseManyObjectsScheme = z.object({
	count: z.number().nonnegative(),
	next: z.string().nullable(),
	previous: z.string().nullable()
})
